from flask import Flask, render_template, redirect, request, session, url_for
import config
from exts import db
# from models import User, WeekReport, ProNum, Staff, CustUnit, Depart, Duty
# from decorators import login_required

app = Flask(__name__)
app.config.from_object(config)
db.init_app(app)

@app.route('/')
def index():
    return render_template('index.html')

@app.route('/add_depart/', methods=['GET', 'POST'])
def add_depart():
    if request.method == 'GET':
        return render_template('inter/add_depart.html')


@app.route('/add_staff/', methods=['GET', 'POST'])
def add_staff():
    if request.method == 'GET':
        return render_template('inter/add_staff.html')
    else:
        pass


@app.route('/add_cust/', methods=['GET', 'POST'])
def add_cust():
    if request.method == 'GET':
        return render_template('inter/add_duty.html')
    else:
        pass
# @app.route('/adddepart/', methods=['GET', 'POST'])
# def adddepart():
#     if request.method == 'GET':
#         return render_template('add_depart.html')
#     else:
#         pass


if __name__ == '__main__':
    app.run()
